using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class CustomerServiceUtil
    {
	
		static internal ICustomerService CreateCustomerService()
        {
            ICustomerService target = IoCFactory.Resolve<ICustomerService>();
            return target;
        }
				#region Customer Test
 
        

		public static Customer CreateCustomer()
        {
            Customer result = GetCustomer();
            ICustomerService service = CreateCustomerService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Customer CreateCustomerFull()
        {
            Customer result = GetCustomerFull();
            ICustomerService service = CreateCustomerService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Customer GetCustomer()
        {
            Customer result = new Customer();
			
            result.FirstName = Guid.NewGuid().ToString();

            result.LastName = Guid.NewGuid().ToString();

            result.Email = Guid.NewGuid().ToString();

            result.SessionId = Guid.NewGuid().ToString();
 
            return result;
            
        }
		
        public static Customer GetCustomerFull()
        {
            Customer result = GetCustomer();
            
            result.IsInactive = true;
 
            return result;
            
        }
		
		#endregion Customer Test
	

	}
}
